/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: dm_v2.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf;

public final class DmV2 {
  private DmV2() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface dm_v2OrBuilder extends
      // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     * @return Whether the dmV220 field is set.
     */
    boolean hasDmV220();
    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     * @return The dmV220.
     */
    dm_v2.dm_v2_20 getDmV220();
    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     */
    dm_v2.dm_v2_20OrBuilder getDmV220OrBuilder();
  }
  /**
   * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2}
   */
  public static final class dm_v2 extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2)
      dm_v2OrBuilder {
  private static final long serialVersionUID = 0L;
    // Use dm_v2.newBuilder() to construct.
    private dm_v2(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private dm_v2() {
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new dm_v2();
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              dm_v2.class, Builder.class);
    }

    public interface dm_v2_20OrBuilder extends
        // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>string avatar = 4;</code>
       * @return The avatar.
       */
      String getAvatar();
      /**
       * <code>string avatar = 4;</code>
       * @return The bytes for avatar.
       */
      com.google.protobuf.ByteString
          getAvatarBytes();
    }
    /**
     * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20}
     */
    public static final class dm_v2_20 extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20)
        dm_v2_20OrBuilder {
    private static final long serialVersionUID = 0L;
      // Use dm_v2_20.newBuilder() to construct.
      private dm_v2_20(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private dm_v2_20() {
        avatar_ = "";
      }

      @Override
      @SuppressWarnings({"unused"})
      protected Object newInstance(
          UnusedPrivateParameter unused) {
        return new dm_v2_20();
      }

      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                dm_v2_20.class, Builder.class);
      }

      public static final int AVATAR_FIELD_NUMBER = 4;
      @SuppressWarnings("serial")
      private volatile Object avatar_ = "";
      /**
       * <code>string avatar = 4;</code>
       * @return The avatar.
       */
      @Override
      public String getAvatar() {
        Object ref = avatar_;
        if (ref instanceof String) {
          return (String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          avatar_ = s;
          return s;
        }
      }
      /**
       * <code>string avatar = 4;</code>
       * @return The bytes for avatar.
       */
      @Override
      public com.google.protobuf.ByteString
          getAvatarBytes() {
        Object ref = avatar_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          avatar_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      private byte memoizedIsInitialized = -1;
      @Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
      }

      @Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 4, avatar_);
        }
        getUnknownFields().writeTo(output);
      }

      @Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, avatar_);
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @Override
      public boolean equals(final Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof dm_v2_20)) {
          return super.equals(obj);
        }
        dm_v2_20 other = (dm_v2_20) obj;

        if (!getAvatar()
            .equals(other.getAvatar())) return false;
        if (!getUnknownFields().equals(other.getUnknownFields())) return false;
        return true;
      }

      @Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + AVATAR_FIELD_NUMBER;
        hash = (53 * hash) + getAvatar().hashCode();
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static dm_v2_20 parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static dm_v2_20 parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static dm_v2_20 parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static dm_v2_20 parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static dm_v2_20 parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static dm_v2_20 parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static dm_v2_20 parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static dm_v2_20 parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      public static dm_v2_20 parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }

      public static dm_v2_20 parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static dm_v2_20 parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static dm_v2_20 parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      @Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(dm_v2_20 prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @Override
      protected Builder newBuilderForType(
          BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20)
          dm_v2_20OrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor;
        }

        @Override
        protected FieldAccessorTable
            internalGetFieldAccessorTable() {
          return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  dm_v2_20.class, Builder.class);
        }

        // Construct using tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.DmV2.dm_v2.dm_v2_20.newBuilder()
        private Builder() {

        }

        private Builder(
            BuilderParent parent) {
          super(parent);

        }
        @Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          avatar_ = "";
          return this;
        }

        @Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor;
        }

        @Override
        public dm_v2_20 getDefaultInstanceForType() {
          return dm_v2_20.getDefaultInstance();
        }

        @Override
        public dm_v2_20 build() {
          dm_v2_20 result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @Override
        public dm_v2_20 buildPartial() {
          dm_v2_20 result = new dm_v2_20(this);
          if (bitField0_ != 0) { buildPartial0(result); }
          onBuilt();
          return result;
        }

        private void buildPartial0(dm_v2_20 result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.avatar_ = avatar_;
          }
        }

        @Override
        public Builder clone() {
          return super.clone();
        }
        @Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            Object value) {
          return super.setField(field, value);
        }
        @Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            Object value) {
          return super.addRepeatedField(field, value);
        }
        @Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof dm_v2_20) {
            return mergeFrom((dm_v2_20)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(dm_v2_20 other) {
          if (other == dm_v2_20.getDefaultInstance()) return this;
          if (!other.getAvatar().isEmpty()) {
            avatar_ = other.avatar_;
            bitField0_ |= 0x00000001;
            onChanged();
          }
          this.mergeUnknownFields(other.getUnknownFields());
          onChanged();
          return this;
        }

        @Override
        public final boolean isInitialized() {
          return true;
        }

        @Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          if (extensionRegistry == null) {
            throw new NullPointerException();
          }
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                case 34: {
                  avatar_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 34
                default: {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
              } // switch (tag)
            } // while (!done)
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.unwrapIOException();
          } finally {
            onChanged();
          } // finally
          return this;
        }
        private int bitField0_;

        private Object avatar_ = "";
        /**
         * <code>string avatar = 4;</code>
         * @return The avatar.
         */
        public String getAvatar() {
          Object ref = avatar_;
          if (!(ref instanceof String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            avatar_ = s;
            return s;
          } else {
            return (String) ref;
          }
        }
        /**
         * <code>string avatar = 4;</code>
         * @return The bytes for avatar.
         */
        public com.google.protobuf.ByteString
            getAvatarBytes() {
          Object ref = avatar_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (String) ref);
            avatar_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <code>string avatar = 4;</code>
         * @param value The avatar to set.
         * @return This builder for chaining.
         */
        public Builder setAvatar(
            String value) {
          if (value == null) { throw new NullPointerException(); }
          avatar_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         * <code>string avatar = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearAvatar() {
          avatar_ = getDefaultInstance().getAvatar();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         * <code>string avatar = 4;</code>
         * @param value The bytes for avatar to set.
         * @return This builder for chaining.
         */
        public Builder setAvatarBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) { throw new NullPointerException(); }
          checkByteStringIsUtf8(value);
          avatar_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        @Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

        @Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20)
      }

      // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20)
      private static final dm_v2_20 DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new dm_v2_20();
      }

      public static dm_v2_20 getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static final com.google.protobuf.Parser<dm_v2_20>
          PARSER = new com.google.protobuf.AbstractParser<dm_v2_20>() {
        @Override
        public dm_v2_20 parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

      public static com.google.protobuf.Parser<dm_v2_20> parser() {
        return PARSER;
      }

      @Override
      public com.google.protobuf.Parser<dm_v2_20> getParserForType() {
        return PARSER;
      }

      @Override
      public dm_v2_20 getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int _DM_V2_20_FIELD_NUMBER = 20;
    private dm_v2_20 DmV220_;
    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     * @return Whether the dmV220 field is set.
     */
    @Override
    public boolean hasDmV220() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     * @return The dmV220.
     */
    @Override
    public dm_v2_20 getDmV220() {
      return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_;
    }
    /**
     * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
     */
    @Override
    public dm_v2_20OrBuilder getDmV220OrBuilder() {
      return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_;
    }

    private byte memoizedIsInitialized = -1;
    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(20, getDmV220());
      }
      getUnknownFields().writeTo(output);
    }

    @Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(20, getDmV220());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof dm_v2)) {
        return super.equals(obj);
      }
      dm_v2 other = (dm_v2) obj;

      if (hasDmV220() != other.hasDmV220()) return false;
      if (hasDmV220()) {
        if (!getDmV220()
            .equals(other.getDmV220())) return false;
      }
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasDmV220()) {
        hash = (37 * hash) + _DM_V2_20_FIELD_NUMBER;
        hash = (53 * hash) + getDmV220().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static dm_v2 parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static dm_v2 parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static dm_v2 parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static dm_v2 parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static dm_v2 parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static dm_v2 parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static dm_v2 parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static dm_v2 parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static dm_v2 parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static dm_v2 parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static dm_v2 parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static dm_v2 parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(dm_v2 prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2)
        dm_v2OrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                dm_v2.class, Builder.class);
      }

      // Construct using tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.DmV2.dm_v2.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getDmV220FieldBuilder();
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        DmV220_ = null;
        if (DmV220Builder_ != null) {
          DmV220Builder_.dispose();
          DmV220Builder_ = null;
        }
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return DmV2.internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor;
      }

      @Override
      public dm_v2 getDefaultInstanceForType() {
        return dm_v2.getDefaultInstance();
      }

      @Override
      public dm_v2 build() {
        dm_v2 result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public dm_v2 buildPartial() {
        dm_v2 result = new dm_v2(this);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }

      private void buildPartial0(dm_v2 result) {
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.DmV220_ = DmV220Builder_ == null
              ? DmV220_
              : DmV220Builder_.build();
          to_bitField0_ |= 0x00000001;
        }
        result.bitField0_ |= to_bitField0_;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof dm_v2) {
          return mergeFrom((dm_v2)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(dm_v2 other) {
        if (other == dm_v2.getDefaultInstance()) return this;
        if (other.hasDmV220()) {
          mergeDmV220(other.getDmV220());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @Override
      public final boolean isInitialized() {
        return true;
      }

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 162: {
                input.readMessage(
                    getDmV220FieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 162
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
      private int bitField0_;

      private dm_v2_20 DmV220_;
      private com.google.protobuf.SingleFieldBuilderV3<
          dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder> DmV220Builder_;
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       * @return Whether the dmV220 field is set.
       */
      public boolean hasDmV220() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       * @return The dmV220.
       */
      public dm_v2_20 getDmV220() {
        if (DmV220Builder_ == null) {
          return DmV220_ == null ? dm_v2_20.getDefaultInstance() : DmV220_;
        } else {
          return DmV220Builder_.getMessage();
        }
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public Builder setDmV220(dm_v2_20 value) {
        if (DmV220Builder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          DmV220_ = value;
        } else {
          DmV220Builder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public Builder setDmV220(
          dm_v2_20.Builder builderForValue) {
        if (DmV220Builder_ == null) {
          DmV220_ = builderForValue.build();
        } else {
          DmV220Builder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public Builder mergeDmV220(dm_v2_20 value) {
        if (DmV220Builder_ == null) {
          if (((bitField0_ & 0x00000001) != 0) &&
            DmV220_ != null &&
            DmV220_ != dm_v2_20.getDefaultInstance()) {
            getDmV220Builder().mergeFrom(value);
          } else {
            DmV220_ = value;
          }
        } else {
          DmV220Builder_.mergeFrom(value);
        }
        if (DmV220_ != null) {
          bitField0_ |= 0x00000001;
          onChanged();
        }
        return this;
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public Builder clearDmV220() {
        bitField0_ = (bitField0_ & ~0x00000001);
        DmV220_ = null;
        if (DmV220Builder_ != null) {
          DmV220Builder_.dispose();
          DmV220Builder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public dm_v2_20.Builder getDmV220Builder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getDmV220FieldBuilder().getBuilder();
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      public dm_v2_20OrBuilder getDmV220OrBuilder() {
        if (DmV220Builder_ != null) {
          return DmV220Builder_.getMessageOrBuilder();
        } else {
          return DmV220_ == null ?
              dm_v2_20.getDefaultInstance() : DmV220_;
        }
      }
      /**
       * <code>.tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2.dm_v2_20 _dm_v2_20 = 20;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder>
          getDmV220FieldBuilder() {
        if (DmV220Builder_ == null) {
          DmV220Builder_ = new com.google.protobuf.SingleFieldBuilderV3<
              dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder>(
                  getDmV220(),
                  getParentForChildren(),
                  isClean());
          DmV220_ = null;
        }
        return DmV220Builder_;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2)
    }

    // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.codec.bilibili.protobuf.dm_v2)
    private static final dm_v2 DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new dm_v2();
    }

    public static dm_v2 getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<dm_v2>
        PARSER = new com.google.protobuf.AbstractParser<dm_v2>() {
      @Override
      public dm_v2 parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

    public static com.google.protobuf.Parser<dm_v2> parser() {
      return PARSER;
    }

    @Override
    public com.google.protobuf.Parser<dm_v2> getParserForType() {
      return PARSER;
    }

    @Override
    public dm_v2 getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    String[] descriptorData = {
      "\n\013dm_v2.proto\022:tech.ordinaryroad.live.ch" +
      "at.client.codec.bilibili.protobuf\"\202\001\n\005dm" +
      "_v2\022]\n\t_dm_v2_20\030\024 \001(\0132J.tech.ordinaryro" +
      "ad.live.chat.client.codec.bilibili.proto" +
      "buf.dm_v2.dm_v2_20\032\032\n\010dm_v2_20\022\016\n\006avatar" +
      "\030\004 \001(\tB<\n:tech.ordinaryroad.live.chat.cl" +
      "ient.codec.bilibili.protobufb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor,
        new String[] { "DmV220", });
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor =
      internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_descriptor.getNestedTypes().get(0);
    internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_tech_ordinaryroad_live_chat_client_codec_bilibili_protobuf_dm_v2_dm_v2_20_descriptor,
        new String[] { "Avatar", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
